home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 3
/
Amoszine 3.adf
/
Celebrity_source
/
dual_playfield_fade.AMOS
/
dual_playfield_fade.amosSourceCode
Wrap
AMOS Source Code
|
1992-02-26
|
8KB
|
271 lines
' *************************************************************
'
' Appear/Fade Program Using Dual Playfield
'
' - ** By Paul Nordovics ** -
'
' The Proc Will Open Screens 0,1,2 And
' Close Them Again When Done
'
' The Text Was Taken From A Game I Wrote (Particle Man)
' Available On Assasins 105 (plug! plug!)
'
' If you use this in your own programs I won't be offended if
' you mention me in your creditz !!!
' *************************************************************
'
FX
End
'
Procedure FX
' *********************
' Set up storage screen
' *********************
Screen Open 2,320,256,4,Lowres
Curs Off : Flash Off
Cls 0 : Paper 0 : Pen 1
Screen Hide
'
' **********************************
' Set up top layer of dual playfield
' **********************************
Screen Open 0,320,256,4,Lowres
Curs Off : Flash Off : Hide
Cls 0 : Paper 0 : Pen 1
Double Buffer
'
' *************************************
' Set up bottom layer of dual playfield
' *************************************
Screen Open 1,320,256,4,Lowres
Curs Off : Flash Off
Cls 0 : Paper 0 : Pen 1
Double Buffer
'
Wait Vbl
Dual Playfield 0,1
'
' ******************************************************
' Set colour 1 of top layer and colour 1 of bottom layer
' ******************************************************
Screen 0
Colour 1,$FFF
Colour 9,0
'
SPEED=4 : Rem change me !!!
'
' *********
' Main loop
' *********
Do
' ********************************************
' Get page of text and print to storage screen
' ********************************************
Screen 2
Cls 0
Home
Repeat
Read _TEXT$
If _TEXT$="#" Then Goto HELL : Rem structured programs never were my strong point !
If _TEXT$<>"*"
Print _TEXT$
End If
Until _TEXT$="*"
'
Locate ,30
Centre "<<Press Fire>>"
'
' *****************************************************
' Copy storage screen to bottom layer of dual playfield
' *****************************************************
Screen Copy 2 To 1
Screen Swap 1
Screen Copy 2 To 1
'
COUNT=16
Screen 0
'
' *****
' Do fx
' *****
Repeat
If SPEED>0 and COUNT<>8 Then Wait SPEED
' **************************************************************
' Half way through fade/appear fx the layer contents are swapped
' **************************************************************
If COUNT=8
Screen Copy 0 To 1
Screen Copy 2 To 0
Screen Swap
End If
' **********************************************************
' Get colour 1 of each layer and either increase or decrease
' value by $111 depending on how far into the fx we are
' **********************************************************
T_C=Colour(1)
B_C=Colour(9)
If COUNT>8
Add T_C,-$111
Add B_C,$111
Else
Add T_C,$111
Add B_C,-$111
End If
Colour 1,T_C
Colour 9,B_C
Add COUNT,-1
Until COUNT=0
'
' *******************
' Wait for user input
' *******************
Repeat : Until Fire(1)
'
' ****************************************************************
' This is done outside of the main loop for speed. As we are using
' double buffering, each layer of the dual playfield consists of
' two screens. This bit puts the same image of each layer into
' its two screens.
' ****************************************************************
Screen Copy 0 To 1
Screen Copy 2 To 0
Screen Swap
'
'
Loop
'
HELL:
'
' **********************************
' All done so do a bit of tidying up
' **********************************
Screen 0
' ******************************
' Fade out the last page of text
' ******************************
If SPEED>0
Fade SPEED : Wait 15*SPEED
Else
Fade 1 : Wait 15
End If
For K=0 To 2 : Screen Close K : Next K
' -------------------------------------------------------------
' *************************************************************
'
' - << Your text here please >> -
'
' * Indicates end of a page of text
' # Indicates end of text
'
' Ensure text fits between the > < markers and it will fit on
' a screen line
' *************************************************************
'
_TEXT:
' > <
Data "THE IDEA WITH PARTICLE MAN IS TO"
Data "COLLECT AND DISPOSE OF A NUMBER OF"
Data "BOMBS WHICH ARE PLACED IN THE MAZE AT"
Data "RANDOM BY THE MONSTERS."
Data "THE BOMBS HAVE A LIMITED LIFE AND IF"
Data "LEFT ALONE FOR TOO LONG WILL EXPLODE."
Data "IF THIS HAPPENS, PARTICLE MAN LOSES"
Data "SOME ENERGY AND IF ALL HIS ENERGY IS"
Data "LOST HE LOSES A LIFE. A COLLISION"
Data "WITH ANY OF THE MONSTERS ALSO RESULTS"
Data "IN A LOSS OF LIFE."
Data "AS A WARNING, WHEN A BOMB'S TIMER IS"
Data "BELOW THE HALF-WAY STAGE, IT WILL FLASH."
Data " "
Data "TO DISPOSE OF A BOMB PARTICLE MAN FIRST"
Data "NEEDS TO ABSORB IT. IF THE BOMBS ARE"
Data "CLOSE TOGETHER, RUN OVER THE ONE YOU"
Data "WANT AND PRESS FIRE. IF THE BOMBS ARE"
Data "FAR APART HOLD DOWN FIRE AND PARTICLE"
Data "MAN WILL ABSORB THE FIRST BOMB HE"
Data "ENCOUNTERS. THE BOMB WILL STAY ABSORBED"
Data "UNTIL YOU LET GO OF THE FIRE BUTTON."
Data "ONCE PARTICLE MAN HAS ABSORBED A BOMB"
Data "HE CAN DISPOSE OF IT BY SIMPLY RUNNING"
Data "OVER A PORTAL."
Data "*"
Data "IF A BOMB IS ABSORBED IT'S TIMER IS"
Data "TEMPORARILY DISABLED AND IF RETURNED"
Data "TO THE SCREEN (BY LETTING GO OF FIRE)"
Data "WILL COUNTDOWN FROM THE BEGINING AGAIN."
Data " "
Data "TO COMPLETE THE LEVEL YOU MUST DISPOSE"
Data "OF THE AMOUNT OF BOMBS INDICATED ON THE"
Data "STATUS PANEL AT THE BOTTOM OF THE"
Data "SCREEN."
Data " "
Data "PARTICLE MAN IS CONTROLLED USING A"
Data "JOYSTICK IN PORT 1 AND YOU CAN ABORT"
Data "A GAME BY PRESSING THE <ESC> KEY."
Data " "
Data "YOU'LL NEED 1 MEG FOR THIS GAME TO WORK."
Data "(SORRY 1/2 MEG OWNERS!)"
Data "*"
Data "OPTIONS PAGE:"
Data "MOVE THE JOYSTICK UP AND DOWN TO SELECT"
Data "AN OPTION AND PRESS FIRE TO CYCLE"
Data "THROUGH THE SETTINGS."
Data " "
Data "LIVES (1-8):"
Data "A LOW SETTING GIVES YOU A HIGHER SCORE."
Data " "
Data "DIFFICULTY (EASY-MANIC!):"
Data "CHOOSE 'VERY HARD' OR 'MANIC' IF YOU"
Data "WANT TO PLAY THE WHOLE GAME."
Data " "
Data "MUSIC (ON/OFF): OBVIOUS!"
Data " "
Data "SOUND (ON/OFF): OBVIOUS!"
Data " "
Data "GAME SPEED (SLOW/FAST):"
Data "IF YOU FIND PARTICLE MAN A BIT"
Data "DIFFICULT TO CONTROL, TRY THE SLOWER"
Data "SETTING."
Data " "
Data "DIAGONAL MOVEMENT (ON/OFF):"
Data "TURN OFF TO STOP THE JOYSTICK DIAGONALS"
Data "FROM BEING READ."
Data "*"
Data "SAVE OPTIONS:"
Data "CHOOSE THIS IF YOU WANT YOUR NEW"
Data "SETTINGS SAVED ONTO THE DISC. CAREFUL"
Data "AS THERE IS NO WAY OF GETTING THE"
Data "ORIGINAL SETTINGS BACK."
Data " "
Data "EXIT:"
Data "TAKES YOU BACK TO THE TITLE PAGE."
Data "*"
Data "THIS GAME WAS WRITTEN AND COMPILED"
Data " "
Data "USING AMOS AND IS PUBLIC DOMAIN."
Data " "
Data " "
Data " "
Data " "
Data "IF ANYBODY HAS ANY COMMENTS ON THIS"
Data "GAME OR JUST WANTS TO DROP ME A LINE"
Data "WRITE TO:"
Data " "
Data "PAUL NORDOVICS"
Data "4 KATHARINE STREET"
Data "MILLOM"
Data "CUMBRIA LA18 4AQ"
Data " "
Data "I AM ALSO LOOKING FOR A DECENT ARTIST"
Data "TO DO SOME GRAPHICS FOR MY NEXT GAME"
Data "SO IF YOU WANT TO HELP PLEASE WRITE."
Data " "
Data "IF YOU LIKE THIS GAME AND WOULD LIKE AN"
Data "ENHANCED VERSION CONTAINING MORE LEVELS"
Data "MONSTERS/MAP EDITOR ETC SEND �5 TO THE"
Data "ABOVE ADDRESS."
Data " "
Data "HAVE FUN!!!"
Data "*"
Data "#"
End Proc